package com.ss.student.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ss.student.dao.StudentDao;
import com.ss.student.pojo.StudentInfo;
import com.ss.student.service.StudentService;
/**
 * 学生管理
 * @author Administrator
 *
 */
@Service
public class StudentServiceImpl implements StudentService {
	@Autowired
	private StudentDao dao;
	@Override
	public void addStu(StudentInfo info) throws Exception {
		// TODO Auto-generated method stub
		dao.addStu(info);
	}

	@Override
	public List<StudentInfo> queryStu(StudentInfo info) throws Exception {
		// TODO Auto-generated method stub
		return dao.queryStu(info);
	}

	@Override
	public boolean delStu(String id) throws Exception {
		// TODO Auto-generated method stub
		int r= dao.delStu(id);
		return r>0?true:false;
	}

	@Override
	public boolean updateStu(StudentInfo info) throws Exception {
		// TODO Auto-generated method stub
		int r= dao.updateStu(info);
		return r>0?true:false;
	}

	@Override
	public StudentInfo getOneStu(StudentInfo info) throws Exception {
		// TODO Auto-generated method stub
		return dao.getOneStu(info);
	}

}
